package org.testtools.assertion;

import java.util.List;
import java.util.Map;

public class AssertThat {

	public static boolean isNull(Object... args) {
		for (int i = 0; i < args.length; i++)
			if (args[i] == null)
				return true;

		return false;
	}

	public static boolean isNullOrEmpty(String... args) {
		for (int i = 0; i < args.length; i++)
			if (args[i] == null || args[i].isEmpty())
				return true;

		return false;
	}

	public static boolean isNullOrEmpty(Object... args) {
		for (int i = 0; i < args.length; i++) {
			if (args[i] == null)
				return true;

			if (args[i] instanceof String && ((String) args[i]).isEmpty())
				return true;

			if (args[i] instanceof List<?> && ((List<?>) args[i]).isEmpty())
				return true;

			if (args[i] instanceof Map<?, ?> && ((Map<?, ?>) args[i]).isEmpty())
				return true;
		}
		return false;
	}
}
